home *** CD-ROM | disk | FTP | other *** search
/ SPACE 2 / SPACE - Library 2 - Volume 1.iso / music / 188 / pascal / pascalii.doc < prev    next >
Text File  |  1987-10-14  |  6KB  |  195 lines

  1.         Pascalii.prg
  2.         ============
  3.         
  4.     This is a shell that is designed to replace the shell program provided
  5. with OSS's personal compiler.  The basic functions of the new shell are the 
  6. same.  The main advantage of my shell is that all the basic commands are
  7. now single key-stroke executable.  Following is a list of the menu entries
  8. and their key equivalents. (if they exist)
  9.  
  10.     Menu Name    Key equivalent    function
  11.     ===================================================================
  12.     Edit        E        Edit the file that is currently 
  13.                     selected as the edit file.  If no
  14.                     current edit file then allows choice
  15.                     of file.
  16.  
  17.     Compile        C        Compile the file that is currently
  18.                     selected as the compile file.  If no
  19.                     current compile file then allows 
  20.                     choice of file.
  21.  
  22.     Link        L        Link the .o file that corresponds
  23.                     to the selected compile file.  The
  24.                     next version will allow separate
  25.                     link file selection.
  26.  
  27.     Run        R        Run the program that is currently
  28.                     selected as the run program.  If no
  29.                     current run file then allows choice
  30.                     of file.  If the program is a TOS
  31.                     program then the screen is cleared,
  32.                     the program is run, then waits for 
  33.                     a key to be pressed before restoring
  34.                     the desk top.
  35.  
  36.     File        F        Change the edit file.
  37.  
  38.     Main        M        Change the compile file.
  39.  
  40.     Active        A        Change the run file.
  41.  
  42.     Quit        Q        Exit the shell.
  43.                     
  44.     Compiler Options None        Select the compiler options.
  45.     
  46.     Linker Options   None        Select the linker options.  A 
  47.                     warning is needed here.  Because 
  48.                     of GEMDOS limitations make sure
  49.                     that the length of all the 
  50.                     additional files + 13 < 127.
  51.                     Why can't they do it right?
  52.                     
  53.     Editor Options  None        This allows you to specify wether
  54.                     your editor is GEM based or not.
  55.                     If you use an editor that can be
  56.                     customized with arguments then you
  57.                     can specify them here.  Ignore the
  58.                     box about what kind of parameters
  59.                     the editor takes.  
  60.  
  61.     Save Options    None        Save the options that you have 
  62.                     selected.    
  63.     
  64.     Make Path    P        Select the MAKEFILE.
  65.     
  66.     Do Make     D        Do a make.  See description of make
  67.                     which follows.
  68.  
  69.     Touch        T        Set the date of a file to the 
  70.                     current date.
  71.  
  72.     Sleep a while   None        Put screen to sleep to prevent 
  73.                     burnin.  Works best on Monochrome.
  74.                     I just got color monitor so next 
  75.                     version will work for color.
  76.  
  77.     Delete a file   None        Cooks your supper.
  78.  
  79.  
  80.         MAKE facility.
  81.         =============
  82.         
  83.     Make is a facility written in order to allow better maintenance of
  84. larger programing projects.  If for example you have a project (like this
  85. shell) that is written in a modular fashion then trying to remember what 
  86. files you have edited and need recompiling can become quite tedious.  Make
  87. will do this for you provided that you first det up a makefile.  In this
  88. file you will set up a set of dependencies.  The format of the file is as 
  89. follows.  
  90.  
  91.     Any line begining with a # is ignored.
  92.     
  93.     The first line can define the compile flags used for all the 
  94. compiles.  If the first line of the file is FLAGS then the next line is
  95. used as the flags.  See the example make file that I've included at the
  96. end of this document.
  97.  
  98.     The rest of the file consists of sets of lines which consist of
  99. a dependency line an a series of commands that need to be executed in 
  100. order to bring the dependent file up to date.  The dependency line has the
  101. following syntax.
  102.  
  103. FILENAME:<tab>file1,file2,file3,...,filen
  104.     Currently there is a limit of 20 critical files. (The files that
  105.     the dependent file depends on).  
  106.     
  107.     Each of the command lines that follow have to start with a tab 
  108. and then the command that is to be run.  if you need to compile then
  109. you can use the COMPILE command instead of typing in the full command
  110. line.  The COMPILE command assumes that you wish to compile the first 
  111. critical file.
  112.     If you need to link then use the LINK command.  If the command 
  113. line starts with a .bat file then if that batch file exists then it is
  114. run with the appropriate arguments taken from the rest of the command line.
  115. (This was a last minute hack as I want to use this shell to port a couple
  116. of c programs to the ST)  (See later for the batch file format.)
  117.     If the command line is none of the above then the line is 
  118. simply executed.
  119.  
  120.     The last line of the file that is parsed is a line that
  121. only has the word END in upper case on it.  (Both the Compile and
  122. link commands have to be in upper case.  Next version will change this)
  123.  
  124.     Please be careful when using this as error checking is not 
  125. as good as it should (and hopefully will ) be.
  126.  
  127.     COMPILER FLAGS
  128.     ==============
  129.     
  130.     The flags for the compiler are as follows.
  131.     
  132.     /GEM    Compile as a GEM program
  133.     /PAUSE  Pause after errors
  134.     /DEBUG  Full debug mode
  135.     /CHECK  Perform Range checking
  136.     /NOCHECK Don't perform stack heap collision check.
  137.     /CLEAR  Initialize variables.
  138.     
  139.     I have never tried to specify a temporary directory  but
  140.     I suspect that just giving the path name as an argument 
  141.     will suffice.  I will document this in the next version.
  142.     
  143.         BATCH FILES
  144.         ===========
  145.         
  146.         A maximum of 9 arguments are allowed.  Currently all that this
  147. does is to substitute any argument place holder with the appropriate 
  148. argument.  The palce holders are of the form %n where n is the number of
  149. the argument.  I do not know what will happen if you try to access an
  150. argument that was not on the command line.  (don't do it yet)
  151.  
  152. Also make sure that the last line does not have a line return.  (this 
  153. is a new feature and will become more robust)
  154.  
  155.     EXAMPLE MAKEFILE
  156.     ================
  157.     
  158. #Notice that the program is the last set of dependencies.  This is because
  159. #this is a one pass make facility.  Thus you have to make sure that all files
  160. #depend on files that have been defined earlier.  This should cause no 
  161. #problem exept if you have a preprocessor of some sort.  
  162. #
  163. #Makefile for Pascalii.prg
  164. #
  165. # Programmed by john buchanan
  166. #
  167. FLAGS
  168. /GEM /PAUSE /DEBUG /CHECK
  169. #
  170. #Compile the batch file stuff
  171. #
  172. batstuff.o:    batstuff.pas
  173.     COMPILE
  174. #
  175. #Compile the tools file
  176. #
  177. pasctols.o:    pasctols.pas
  178.     COMPILE
  179. #
  180. #Compile the make utility
  181. #
  182. pascmake.o:    pascmake.pas
  183.     COMPILE
  184. #
  185. #compile the main program
  186. #
  187. pascalii.o:    pascalii.pas
  188.     COMPILE
  189. #
  190. #Link the modules
  191. #
  192. pascalii.PRG:    PASCALII.O,PASCMAKE.O,batstuff.o,PASCTOLS.O,PASGEM
  193.     LINK
  194. END
  195.